package com.zjapl.web.action;

import com.opensymphony.xwork2.ActionSupport;
import com.zjapl.web.action.vo.Team;
import com.zjapl.web.service.TeamService;
import com.zjapl.web.service.impl.TeamServiceImpl;

/**
 * @author 作者:方武斌 E-mail: fangwb@zjapl.com
 * @version 创建时间：2013-1-15 上午9:18:21
 *          类说明
 */
public class AddTeamAction extends ActionSupport {
	
	private static final long serialVersionUID = 1L;
	TeamService teamServiceImpl = new TeamServiceImpl();
	private Team team;

	/**
	 * 获取team
	 * 
	 * @return team
	 */
	public Team getTeam() {
		return team;
	}

	/**
	 * 设置team
	 * 
	 * @param team team
	 */
	public void setTeam(Team team) {
		this.team = team;
	}

	public String execute() throws Exception {
       
		if(teamServiceImpl.addTeam(team)){
			return SUCCESS;
		}
		return ERROR;
	}
}
